library ieee;
use ieee.std_logic_1164.all;
entity AES is
	port(
		plaintext : in std_logic_vector(127 downto 0);
		keytext :	in std_logic_vector(127 downto 0);
		encrypt : in std_logic;
		go : in std_logic;
		ciphertext : out std_logic_vector(127 downto 0);
		done : out std_logic := '0'
	);
end;

use work.aes_functions.all;
architecture behaviour of AES is
begin
	process
	begin
		wait until go = '1';
		done <= '0';
		ciphertext <= aes_core(plaintext, keytext, encrypt);
		done <= '1';
	end process;
end;